package com.ybn.controller;

import com.ybn.entity.VoteSubject;
import com.ybn.service.Impl.VoteItemServiceimpl;
import com.ybn.service.Impl.VoteSubjecServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/vote_item")
public class VoteItemController {
    @Resource
    private VoteItemServiceimpl voteItemService;
    @Resource
    private VoteSubjecServiceImpl voteSubjecService;

    @RequestMapping("/view")
    public String view(Integer vsid, Model model){
        VoteSubject voteSubjectId = voteSubjecService.getVoteSubjectById(vsid);
        model.addAttribute("voteSubjectId",voteSubjectId);
        return "view";
    }
}
